package com.pignest.hotel.beans.global;

import org.apache.commons.lang.StringUtils;

import com.pignest.hotel.spring.ContextHolder;

/**
 * 首页菜单
 * */
public class Menu {

	private String name;
	private String url;
	private String icon;
//	private String permissions;
	private String parameter;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
//	public String getPermissions() {
//		return permissions;
//	}
//	public void setPermissions(String permission) {
//		this.permissions = permission;
//	}
	
	public void setParameter(String parameter) {
		this.parameter = parameter;
	}
	
	public String getParameter() {
		return parameter;
	}
	
	/////////////////////////
	
	public String getPath() {
		if (StringUtils.isNotEmpty(url))
			return ContextHolder.getContextPath() + url;
		return null;
	}
}
